package com.mnsq.common.bean.entity.friends;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.mnsq.common.bean.entity.CommonEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @author 周俭
 */
@Data
@Accessors(chain = true)
@Entity
@Table(name = "focus", indexes = {@Index(name = "self_target", columnList = "self_id,target_user_id", unique = true)})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Focus extends CommonEntity {
    private static final long serialVersionUID = -3366392000442037949L;
    @Column(name = "self_id", columnDefinition = "bigint(19) not null comment '自身id'")
    private Long selfId;
    @Column(name = "target_user_id", columnDefinition = "bigint(19) not null comment '目标用户id'")
    private Long targetUserId;
}
